/*
Abstract:
  IO workers definitions

Last changed:
  $Id: dataprovider.h 54 2009-03-09 22:14:47Z vitamin.caig $

Author:
  (C) Vitamin/CAIG/2001

  This file is the part of Textator project
*/

#ifndef __DATAPROVIDER_H_DEFINED__
#define __DATAPROVIDER_H_DEFINED__

#include <types.h>

#include <memory>

namespace IO
{
  class SourceDataProvider
  {
  public:
    typedef std::auto_ptr<SourceDataProvider> Ptr;
    virtual ~SourceDataProvider()
    {
    }

    virtual void SetNestedSource(const String& name) = 0;
    virtual bool GetLine(String& value) = 0;
    virtual void GetExternalFileContent(const String& name, String& value) const = 0;
    virtual void GetCurrentPosition(String& pos) const = 0;

    static Ptr Create(const String& name);
  };
}

#endif //__DATAPROVIDER_H_DEFINED__
